home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Drag.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  24.3 KB  |  833 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Drag.a
  3. ;
  4. ;    Contains:    Drag and Drop Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1992-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DRAG__') = 'UNDEFINED' THEN
  19. __DRAG__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  25.     include 'Events.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  31.     include 'AppleEvents.a'
  32.     ENDIF
  33.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  34.     include 'Quickdraw.a'
  35.     ENDIF
  36.  
  37.  
  38. ;  _________________________________________________________________________________________________________
  39. ;      
  40. ;   • DRAG MANAGER DATA TYPES
  41. ;  _________________________________________________________________________________________________________
  42.  
  43.  
  44.  
  45.  
  46. ; typedef UInt32                         ItemReference
  47.  
  48. ; typedef OSType                         FlavorType
  49.  
  50.  
  51. ;  _________________________________________________________________________________________________________
  52. ;      
  53. ;   • DRAG ATTRIBUTES
  54. ;  _________________________________________________________________________________________________________
  55.  
  56.  
  57.  
  58. ; typedef OptionBits                     DragAttributes
  59.  
  60.  
  61. kDragHasLeftSenderWindow        EQU        $00000001            ; drag has left the source window since TrackDrag
  62. kDragInsideSenderApplication    EQU        $00000002            ; drag is occurring within the sender application
  63. kDragInsideSenderWindow            EQU        $00000004            ; drag is occurring within the sender window
  64.  
  65. ;  _________________________________________________________________________________________________________
  66. ;      
  67. ;   • DRAG IMAGE FLAGS
  68. ;  _________________________________________________________________________________________________________
  69.  
  70.  
  71.  
  72. ; typedef OptionBits                     DragImageFlags
  73.  
  74.  
  75. kDragRegionAndImage                EQU        $00000010            ; drag region and image
  76.  
  77. ;  _________________________________________________________________________________________________________
  78. ;      
  79. ;   • DRAG IMAGE TRANSLUCENCY LEVELS
  80. ;  _________________________________________________________________________________________________________
  81.  
  82.  
  83.  
  84. ; typedef UInt32                         DragImageTranslucency
  85.  
  86.  
  87. kDragStandardTranslucency        EQU        0                    ; 65% image translucency (standard)
  88. kDragDarkTranslucency            EQU        1                    ; 50% image translucency
  89. kDragDarkerTranslucency            EQU        2                    ; 25% image translucency
  90. kDragOpaqueTranslucency            EQU        3                    ; 0% image translucency (opaque)
  91.  
  92. ;  _________________________________________________________________________________________________________
  93. ;      
  94. ;   • DRAG DRAWING PROCEDURE MESSAGES
  95. ;  _________________________________________________________________________________________________________
  96.  
  97.  
  98.  
  99. ; typedef SInt16                         DragRegionMessage
  100.  
  101.  
  102. kDragRegionBegin                EQU        1                    ; initialize drawing
  103. kDragRegionDraw                    EQU        2                    ; draw drag feedback
  104. kDragRegionHide                    EQU        3                    ; hide drag feedback
  105. kDragRegionIdle                    EQU        4                    ; drag feedback idle time
  106. kDragRegionEnd                    EQU        5                    ; end of drawing
  107.  
  108. ;  _________________________________________________________________________________________________________
  109. ;      
  110. ;   • ZOOM ACCELERATION
  111. ;  _________________________________________________________________________________________________________
  112.  
  113.  
  114.  
  115. ; typedef SInt16                         ZoomAcceleration
  116.  
  117.  
  118. kZoomNoAcceleration                EQU        0                    ; use linear interpolation
  119. kZoomAccelerate                    EQU        1                    ; ramp up step size
  120. kZoomDecelerate                    EQU        2                    ; ramp down step size
  121.  
  122. ;  _________________________________________________________________________________________________________
  123. ;      
  124. ;   • FLAVOR FLAGS
  125. ;  _________________________________________________________________________________________________________
  126.  
  127.  
  128.  
  129. ; typedef OptionBits                     FlavorFlags
  130.  
  131.  
  132. flavorSenderOnly                EQU        $01                    ; flavor is available to sender only
  133. flavorSenderTranslated            EQU        $02                    ; flavor is translated by sender
  134. flavorNotSaved                    EQU        $04                    ; flavor should not be saved
  135. flavorSystemTranslated            EQU        $0100                ; flavor is translated by system
  136.  
  137. ;  _________________________________________________________________________________________________________
  138. ;      
  139. ;   • SPECIAL FLAVORS
  140. ;  _________________________________________________________________________________________________________
  141.  
  142.  
  143.  
  144.  
  145. flavorTypeHFS                    EQU        'hfs '                ; flavor type for HFS data
  146. flavorTypePromiseHFS            EQU        'phfs'                ; flavor type for promised HFS data
  147. flavorTypeDirectory                EQU        'diry'                ; flavor type for AOCE directories
  148.  
  149. ;  _________________________________________________________________________________________________________
  150. ;      
  151. ;   • DRAG TRACKING HANDLER MESSAGES
  152. ;  _________________________________________________________________________________________________________
  153.  
  154.  
  155.  
  156. ; typedef SInt16                         DragTrackingMessage
  157.  
  158.  
  159. kDragTrackingEnterHandler        EQU        1                    ; drag has entered handler
  160. kDragTrackingEnterWindow        EQU        2                    ; drag has entered window
  161. kDragTrackingInWindow            EQU        3                    ; drag is moving within window
  162. kDragTrackingLeaveWindow        EQU        4                    ; drag has exited window
  163. kDragTrackingLeaveHandler        EQU        5                    ; drag has exited handler
  164.  
  165. ;  _________________________________________________________________________________________________________
  166. ;      
  167. ;   • HFS FLAVORS
  168. ;  _________________________________________________________________________________________________________
  169.  
  170.  
  171.  
  172. HFSFlavor                RECORD 0
  173. fileType                 ds.l    1                ; offset: $0 (0)        ;  file type 
  174. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  file creator 
  175. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  176. fileSpec                 ds        FSSpec            ; offset: $A (10)        ;  file system specification 
  177. sizeof                     EQU *                    ; size:   $50 (80)
  178.                         ENDR
  179. PromiseHFSFlavor        RECORD 0
  180. fileType                 ds.l    1                ; offset: $0 (0)        ;  file type 
  181. fileCreator                 ds.l    1                ; offset: $4 (4)        ;  file creator 
  182. fdFlags                     ds.w    1                ; offset: $8 (8)        ;  Finder flags 
  183. promisedFlavor             ds.l    1                ; offset: $A (10)        ;  promised flavor containing an FSSpec 
  184. sizeof                     EQU *                    ; size:   $E (14)
  185.                         ENDR
  186.  
  187. ;  _________________________________________________________________________________________________________
  188. ;      
  189. ;   • APPLICATION-DEFINED DRAG HANDLER ROUTINES
  190. ;  _________________________________________________________________________________________________________
  191.  
  192.  
  193.  
  194. ;  _________________________________________________________________________________________________________
  195. ;      
  196. ;   • APPLICATION-DEFINED ROUTINES
  197. ;  _________________________________________________________________________________________________________
  198.  
  199.  
  200.  
  201. ;  _________________________________________________________________________________________________________
  202. ;      
  203. ;   • INSTALLING AND REMOVING HANDLERS API'S
  204. ;  _________________________________________________________________________________________________________
  205.  
  206.  
  207.  
  208. ;
  209. ; pascal OSErr InstallTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow, void *handlerRefCon)
  210. ;
  211.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  212.         Macro
  213.         _InstallTrackingHandler
  214.             moveq               #1,D0
  215.             dc.w                $ABED
  216.         EndM
  217.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  218.         IMPORT_CFM_FUNCTION InstallTrackingHandler
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal OSErr InstallReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow, void *handlerRefCon)
  223. ;
  224.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  225.         Macro
  226.         _InstallReceiveHandler
  227.             moveq               #2,D0
  228.             dc.w                $ABED
  229.         EndM
  230.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  231.         IMPORT_CFM_FUNCTION InstallReceiveHandler
  232.     ENDIF
  233.  
  234. ;
  235. ; pascal OSErr RemoveTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow)
  236. ;
  237.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  238.         Macro
  239.         _RemoveTrackingHandler
  240.             moveq               #3,D0
  241.             dc.w                $ABED
  242.         EndM
  243.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  244.         IMPORT_CFM_FUNCTION RemoveTrackingHandler
  245.     ENDIF
  246.  
  247. ;
  248. ; pascal OSErr RemoveReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow)
  249. ;
  250.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  251.         Macro
  252.         _RemoveReceiveHandler
  253.             moveq               #4,D0
  254.             dc.w                $ABED
  255.         EndM
  256.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  257.         IMPORT_CFM_FUNCTION RemoveReceiveHandler
  258.     ENDIF
  259.  
  260.  
  261. ;  _________________________________________________________________________________________________________
  262. ;      
  263. ;   • CREATING & DISPOSING
  264. ;  _________________________________________________________________________________________________________
  265.  
  266.  
  267.  
  268. ;
  269. ; pascal OSErr NewDrag(DragReference *theDrag)
  270. ;
  271.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  272.         Macro
  273.         _NewDrag
  274.             moveq               #5,D0
  275.             dc.w                $ABED
  276.         EndM
  277.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  278.         IMPORT_CFM_FUNCTION NewDrag
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal OSErr DisposeDrag(DragReference theDrag)
  283. ;
  284.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  285.         Macro
  286.         _DisposeDrag
  287.             moveq               #6,D0
  288.             dc.w                $ABED
  289.         EndM
  290.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  291.         IMPORT_CFM_FUNCTION DisposeDrag
  292.     ENDIF
  293.  
  294.  
  295. ;  _________________________________________________________________________________________________________
  296. ;      
  297. ;   • ADDING DRAG ITEM FLAVORS
  298. ;  _________________________________________________________________________________________________________
  299.  
  300.  
  301.  
  302. ;
  303. ; pascal OSErr AddDragItemFlavor(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, FlavorFlags theFlags)
  304. ;
  305.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  306.         Macro
  307.         _AddDragItemFlavor
  308.             moveq               #7,D0
  309.             dc.w                $ABED
  310.         EndM
  311.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  312.         IMPORT_CFM_FUNCTION AddDragItemFlavor
  313.     ENDIF
  314.  
  315. ;
  316. ; pascal OSErr SetDragItemFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, UInt32 dataOffset)
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  319.         Macro
  320.         _SetDragItemFlavorData
  321.             moveq               #9,D0
  322.             dc.w                $ABED
  323.         EndM
  324.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  325.         IMPORT_CFM_FUNCTION SetDragItemFlavorData
  326.     ENDIF
  327.  
  328.  
  329. ;  _________________________________________________________________________________________________________
  330. ;      
  331. ;   • PROVIDING CALLBACK PROCEDURES
  332. ;  _________________________________________________________________________________________________________
  333.  
  334.  
  335.  
  336. ;
  337. ; pascal OSErr SetDragSendProc(DragReference theDrag, DragSendDataUPP sendProc, void *dragSendRefCon)
  338. ;
  339.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  340.         Macro
  341.         _SetDragSendProc
  342.             moveq               #10,D0
  343.             dc.w                $ABED
  344.         EndM
  345.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  346.         IMPORT_CFM_FUNCTION SetDragSendProc
  347.     ENDIF
  348.  
  349.  
  350. ;
  351. ; pascal OSErr SetDragInputProc(DragReference theDrag, DragInputUPP inputProc, void *dragInputRefCon)
  352. ;
  353.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  354.         Macro
  355.         _SetDragInputProc
  356.             moveq               #11,D0
  357.             dc.w                $ABED
  358.         EndM
  359.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  360.         IMPORT_CFM_FUNCTION SetDragInputProc
  361.     ENDIF
  362.  
  363. ;
  364. ; pascal OSErr SetDragDrawingProc(DragReference theDrag, DragDrawingUPP drawingProc, void *dragDrawingRefCon)
  365. ;
  366.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  367.         Macro
  368.         _SetDragDrawingProc
  369.             moveq               #12,D0
  370.             dc.w                $ABED
  371.         EndM
  372.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  373.         IMPORT_CFM_FUNCTION SetDragDrawingProc
  374.     ENDIF
  375.  
  376.  
  377. ;  _________________________________________________________________________________________________________
  378. ;      
  379. ;   • SETTING THE DRAG IMAGE
  380. ;  _________________________________________________________________________________________________________
  381.  
  382.  
  383.  
  384. ;
  385. ; pascal OSErr SetDragImage(DragReference theDrag, PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags)
  386. ;
  387.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  388.         Macro
  389.         _SetDragImage
  390.             moveq               #39,D0
  391.             dc.w                $ABED
  392.         EndM
  393.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  394.         IMPORT_CFM_FUNCTION SetDragImage
  395.     ENDIF
  396.  
  397.  
  398. ;  _________________________________________________________________________________________________________
  399. ;      
  400. ;   • PERFORMING A DRAG
  401. ;  _________________________________________________________________________________________________________
  402.  
  403.  
  404.  
  405. ;
  406. ; pascal OSErr TrackDrag(DragReference theDrag, const EventRecord *theEvent, RgnHandle theRegion)
  407. ;
  408.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  409.         Macro
  410.         _TrackDrag
  411.             moveq               #13,D0
  412.             dc.w                $ABED
  413.         EndM
  414.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  415.         IMPORT_CFM_FUNCTION TrackDrag
  416.     ENDIF
  417.  
  418.  
  419. ;  _________________________________________________________________________________________________________
  420. ;      
  421. ;   • GETTING DRAG ITEM INFORMATION
  422. ;  _________________________________________________________________________________________________________
  423.  
  424.  
  425.  
  426. ;
  427. ; pascal OSErr CountDragItems(DragReference theDrag, UInt16 *numItems)
  428. ;
  429.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  430.         Macro
  431.         _CountDragItems
  432.             moveq               #14,D0
  433.             dc.w                $ABED
  434.         EndM
  435.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  436.         IMPORT_CFM_FUNCTION CountDragItems
  437.     ENDIF
  438.  
  439. ;
  440. ; pascal OSErr GetDragItemReferenceNumber(DragReference theDrag, UInt16 index, ItemReference *theItemRef)
  441. ;
  442.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  443.         Macro
  444.         _GetDragItemReferenceNumber
  445.             moveq               #15,D0
  446.             dc.w                $ABED
  447.         EndM
  448.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  449.         IMPORT_CFM_FUNCTION GetDragItemReferenceNumber
  450.     ENDIF
  451.  
  452. ;
  453. ; pascal OSErr CountDragItemFlavors(DragReference theDrag, ItemReference theItemRef, UInt16 *numFlavors)
  454. ;
  455.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  456.         Macro
  457.         _CountDragItemFlavors
  458.             moveq               #16,D0
  459.             dc.w                $ABED
  460.         EndM
  461.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  462.         IMPORT_CFM_FUNCTION CountDragItemFlavors
  463.     ENDIF
  464.  
  465. ;
  466. ; pascal OSErr GetFlavorType(DragReference theDrag, ItemReference theItemRef, UInt16 index, FlavorType *theType)
  467. ;
  468.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  469.         Macro
  470.         _GetFlavorType
  471.             moveq               #17,D0
  472.             dc.w                $ABED
  473.         EndM
  474.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  475.         IMPORT_CFM_FUNCTION GetFlavorType
  476.     ENDIF
  477.  
  478. ;
  479. ; pascal OSErr GetFlavorFlags(DragReference theDrag, ItemReference theItemRef, FlavorType theType, FlavorFlags *theFlags)
  480. ;
  481.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  482.         Macro
  483.         _GetFlavorFlags
  484.             moveq               #18,D0
  485.             dc.w                $ABED
  486.         EndM
  487.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  488.         IMPORT_CFM_FUNCTION GetFlavorFlags
  489.     ENDIF
  490.  
  491. ;
  492. ; pascal OSErr GetFlavorDataSize(DragReference theDrag, ItemReference theItemRef, FlavorType theType, Size *dataSize)
  493. ;
  494.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  495.         Macro
  496.         _GetFlavorDataSize
  497.             moveq               #19,D0
  498.             dc.w                $ABED
  499.         EndM
  500.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  501.         IMPORT_CFM_FUNCTION GetFlavorDataSize
  502.     ENDIF
  503.  
  504. ;
  505. ; pascal OSErr GetFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, void *dataPtr, Size *dataSize, UInt32 dataOffset)
  506. ;
  507.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  508.         Macro
  509.         _GetFlavorData
  510.             moveq               #20,D0
  511.             dc.w                $ABED
  512.         EndM
  513.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  514.         IMPORT_CFM_FUNCTION GetFlavorData
  515.     ENDIF
  516.  
  517.  
  518. ;  _________________________________________________________________________________________________________
  519. ;      
  520. ;   • DRAG ITEM BOUNDS
  521. ;  _________________________________________________________________________________________________________
  522.  
  523.  
  524.  
  525. ;
  526. ; pascal OSErr GetDragItemBounds(DragReference theDrag, ItemReference theItemRef, Rect *itemBounds)
  527. ;
  528.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  529.         Macro
  530.         _GetDragItemBounds
  531.             moveq               #21,D0
  532.             dc.w                $ABED
  533.         EndM
  534.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  535.         IMPORT_CFM_FUNCTION GetDragItemBounds
  536.     ENDIF
  537.  
  538. ;
  539. ; pascal OSErr SetDragItemBounds(DragReference theDrag, ItemReference theItemRef, const Rect *itemBounds)
  540. ;
  541.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  542.         Macro
  543.         _SetDragItemBounds
  544.             moveq               #22,D0
  545.             dc.w                $ABED
  546.         EndM
  547.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION SetDragItemBounds
  549.     ENDIF
  550.  
  551.  
  552. ;  _________________________________________________________________________________________________________
  553. ;      
  554. ;   • DROP LOCATIONS
  555. ;  _________________________________________________________________________________________________________
  556.  
  557.  
  558.  
  559. ;
  560. ; pascal OSErr GetDropLocation(DragReference theDrag, AEDesc *dropLocation)
  561. ;
  562.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  563.         Macro
  564.         _GetDropLocation
  565.             moveq               #23,D0
  566.             dc.w                $ABED
  567.         EndM
  568.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  569.         IMPORT_CFM_FUNCTION GetDropLocation
  570.     ENDIF
  571.  
  572. ;
  573. ; pascal OSErr SetDropLocation(DragReference theDrag, const AEDesc *dropLocation)
  574. ;
  575.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  576.         Macro
  577.         _SetDropLocation
  578.             moveq               #24,D0
  579.             dc.w                $ABED
  580.         EndM
  581.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  582.         IMPORT_CFM_FUNCTION SetDropLocation
  583.     ENDIF
  584.  
  585.  
  586. ;  _________________________________________________________________________________________________________
  587. ;      
  588. ;   • GETTING INFORMATION ABOUT A DRAG
  589. ;  _________________________________________________________________________________________________________
  590.  
  591.  
  592.  
  593. ;
  594. ; pascal OSErr GetDragAttributes(DragReference theDrag, DragAttributes *flags)
  595. ;
  596.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  597.         Macro
  598.         _GetDragAttributes
  599.             moveq               #25,D0
  600.             dc.w                $ABED
  601.         EndM
  602.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  603.         IMPORT_CFM_FUNCTION GetDragAttributes
  604.     ENDIF
  605.  
  606. ;
  607. ; pascal OSErr GetDragMouse(DragReference theDrag, Point *mouse, Point *globalPinnedMouse)
  608. ;
  609.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  610.         Macro
  611.         _GetDragMouse
  612.             moveq               #26,D0
  613.             dc.w                $ABED
  614.         EndM
  615.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  616.         IMPORT_CFM_FUNCTION GetDragMouse
  617.     ENDIF
  618.  
  619. ;
  620. ; pascal OSErr SetDragMouse(DragReference theDrag, Point globalPinnedMouse)
  621. ;
  622.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  623.         Macro
  624.         _SetDragMouse
  625.             moveq               #27,D0
  626.             dc.w                $ABED
  627.         EndM
  628.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  629.         IMPORT_CFM_FUNCTION SetDragMouse
  630.     ENDIF
  631.  
  632. ;
  633. ; pascal OSErr GetDragOrigin(DragReference theDrag, Point *globalInitialMouse)
  634. ;
  635.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  636.         Macro
  637.         _GetDragOrigin
  638.             moveq               #28,D0
  639.             dc.w                $ABED
  640.         EndM
  641.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  642.         IMPORT_CFM_FUNCTION GetDragOrigin
  643.     ENDIF
  644.  
  645. ;
  646. ; pascal OSErr GetDragModifiers(DragReference theDrag, SInt16 *modifiers, SInt16 *mouseDownModifiers, SInt16 *mouseUpModifiers)
  647. ;
  648.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  649.         Macro
  650.         _GetDragModifiers
  651.             moveq               #29,D0
  652.             dc.w                $ABED
  653.         EndM
  654.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  655.         IMPORT_CFM_FUNCTION GetDragModifiers
  656.     ENDIF
  657.  
  658.  
  659. ;  _________________________________________________________________________________________________________
  660. ;      
  661. ;   • DRAG HIGHLIGHTING
  662. ;  _________________________________________________________________________________________________________
  663.  
  664.  
  665.  
  666. ;
  667. ; pascal OSErr ShowDragHilite(DragReference theDrag, RgnHandle hiliteFrame, Boolean inside)
  668. ;
  669.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  670.         Macro
  671.         _ShowDragHilite
  672.             moveq               #30,D0
  673.             dc.w                $ABED
  674.         EndM
  675.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  676.         IMPORT_CFM_FUNCTION ShowDragHilite
  677.     ENDIF
  678.  
  679. ;
  680. ; pascal OSErr HideDragHilite(DragReference theDrag)
  681. ;
  682.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  683.         Macro
  684.         _HideDragHilite
  685.             moveq               #31,D0
  686.             dc.w                $ABED
  687.         EndM
  688.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  689.         IMPORT_CFM_FUNCTION HideDragHilite
  690.     ENDIF
  691.  
  692. ;
  693. ; pascal OSErr DragPreScroll(DragReference theDrag, SInt16 dH, SInt16 dV)
  694. ;
  695.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  696.         Macro
  697.         _DragPreScroll
  698.             moveq               #32,D0
  699.             dc.w                $ABED
  700.         EndM
  701.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  702.         IMPORT_CFM_FUNCTION DragPreScroll
  703.     ENDIF
  704.  
  705. ;
  706. ; pascal OSErr DragPostScroll(DragReference theDrag)
  707. ;
  708.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  709.         Macro
  710.         _DragPostScroll
  711.             moveq               #33,D0
  712.             dc.w                $ABED
  713.         EndM
  714.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  715.         IMPORT_CFM_FUNCTION DragPostScroll
  716.     ENDIF
  717.  
  718. ;
  719. ; pascal OSErr UpdateDragHilite(DragReference theDrag, RgnHandle updateRgn)
  720. ;
  721.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  722.         Macro
  723.         _UpdateDragHilite
  724.             moveq               #34,D0
  725.             dc.w                $ABED
  726.         EndM
  727.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  728.         IMPORT_CFM_FUNCTION UpdateDragHilite
  729.     ENDIF
  730.  
  731. ;
  732. ; pascal OSErr GetDragHiliteColor(WindowPtr window, RGBColor *color)
  733. ;
  734.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  735.         Macro
  736.         _GetDragHiliteColor
  737.             moveq               #38,D0
  738.             dc.w                $ABED
  739.         EndM
  740.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  741.         IMPORT_CFM_FUNCTION GetDragHiliteColor
  742.     ENDIF
  743.  
  744.  
  745.  
  746. ;  _________________________________________________________________________________________________________
  747. ;      
  748. ;   • UTILITIES
  749. ;  _________________________________________________________________________________________________________
  750.  
  751.  
  752.  
  753.  
  754. ;
  755. ; pascal Boolean WaitMouseMoved(Point initialMouse)
  756. ;
  757.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  758.         Macro
  759.         _WaitMouseMoved
  760.             moveq               #35,D0
  761.             dc.w                $ABED
  762.         EndM
  763.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  764.         IMPORT_CFM_FUNCTION WaitMouseMoved
  765.     ENDIF
  766.  
  767.  
  768. ;
  769. ; pascal OSErr ZoomRects(const Rect *fromRect, const Rect *toRect, SInt16 zoomSteps, ZoomAcceleration acceleration)
  770. ;
  771.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  772.         Macro
  773.         _ZoomRects
  774.             moveq               #36,D0
  775.             dc.w                $ABED
  776.         EndM
  777.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  778.         IMPORT_CFM_FUNCTION ZoomRects
  779.     ENDIF
  780.  
  781. ;
  782. ; pascal OSErr ZoomRegion(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration)
  783. ;
  784.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  785.         Macro
  786.         _ZoomRegion
  787.             moveq               #37,D0
  788.             dc.w                $ABED
  789.         EndM
  790.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  791.         IMPORT_CFM_FUNCTION ZoomRegion
  792.     ENDIF
  793.  
  794.  
  795.  
  796. ;  _________________________________________________________________________________________________________
  797. ;   • OLD NAMES
  798. ;     These are provided for compatiblity with older source bases.  It is recommended to not use them since
  799. ;       they may removed from this interface file at any time.
  800. ;  _________________________________________________________________________________________________________
  801.  
  802.  
  803.  
  804.     IF OLDROUTINENAMES THEN
  805.  
  806. dragHasLeftSenderWindow            EQU        $00000001            ; drag has left the source window since TrackDrag 
  807. dragInsideSenderApplication        EQU        $00000002            ; drag is occurring within the sender application 
  808. dragInsideSenderWindow            EQU        $00000004            ; drag is occurring within the sender window 
  809.  
  810. dragTrackingEnterHandler        EQU        1                    ; drag has entered handler 
  811. dragTrackingEnterWindow            EQU        2                    ; drag has entered window 
  812. dragTrackingInWindow            EQU        3                    ; drag is moving within window 
  813. dragTrackingLeaveWindow            EQU        4                    ; drag has exited window 
  814. dragTrackingLeaveHandler        EQU        5                    ; drag has exited handler 
  815.  
  816. dragRegionBegin                    EQU        1                    ; initialize drawing 
  817. dragRegionDraw                    EQU        2                    ; draw drag feedback 
  818. dragRegionHide                    EQU        3                    ; hide drag feedback 
  819. dragRegionIdle                    EQU        4                    ; drag feedback idle time 
  820. dragRegionEnd                    EQU        5                    ; end of drawing 
  821.  
  822. zoomNoAcceleration                EQU        0                    ; use linear interpolation 
  823. zoomAccelerate                    EQU        1                    ; ramp up step size 
  824. zoomDecelerate                    EQU        2                    ; ramp down step size 
  825.  
  826. kDragStandardImage                EQU        0                    ; 65% image translucency (standard)
  827. kDragDarkImage                    EQU        1                    ; 50% image translucency
  828. kDragDarkerImage                EQU        2                    ; 25% image translucency
  829. kDragOpaqueImage                EQU        3                    ; 0% image translucency (opaque)
  830.     ENDIF    ; OLDROUTINENAMES
  831.     ENDIF ; __DRAG__ 
  832.  
  833.